import jade.core.AID;


import java.util.ArrayList;

/**
 * Trust and reputation abstract model class.
 *
 */

abstract public class Model {
	ArrayList<AID> traders;
	
	public Model(ArrayList<AID> agents) {
		traders = (ArrayList<AID>) agents.clone();
	}
	
	// Update trust	 
	abstract public void updateTrust(AID trader, int history, double modifier);
	
	// Update reputation
	abstract public void updateReputation(AID trader);
	
	abstract public double getReputation(AID trader);
	
	abstract public double getTrust(AID trader);
	
	public void addTrader(AID trader) {
		if (!traders.contains(trader)) {
			traders.add(trader);
		}
	}
	
	public void addTraderList(ArrayList<AID> traders) {
		for (AID t : traders) {
			addTrader(t);
		}
	}
	
	public ArrayList<AID> getTraders() {
		return traders;
	}
	
	public void setTraders(ArrayList<AID> t) {
		this.traders = t;
	}
}
